.foxui-tag {
    background-color: $--color-primary-light-9;
    display: inline-block;
    height: 32px;
    padding: 0 10px;
    line-height: 32px;
    font-size: 12px;
    color: $--color-primary;
    border: 1px solid $--color-primary-light-8;
    border-radius: 4px;
    box-sizing: border-box;
    white-space: nowrap;

    & + & {
        margin-left: 10px;
    }

    .foxui-tag-close {
        display: inline-block;
        cursor: pointer;
        border-radius: 50%;
        text-align: center;
        position: relative;
        font-size: 12px;
        height: 16px;
        width: 16px;
        line-height: 16px;
        vertical-align: middle;
        top: -1px;
        right: -5px;
        opacity: 0.7;
        transition: $--fade-transition;

        &:hover {
            opacity: 1;
        }
    }

    // dark
    &.foxui-dark-primary {
        background-color: $--color-primary;
        border-color: $--color-primary;
        color: $--color-white;
    }

    &.foxui-dark-danger {
        background-color: $--color-danger;
        border-color: $--color-danger;
        color: $--color-white;
    }

    &.foxui-dark-warning {
        background-color: $--color-warning;
        border-color: $--color-warning;
        color: $--color-white;
    }

    &.foxui-dark-success {
        background-color: $--color-success;
        border-color: $--color-success;
        color: $--color-white;
    }

    &.foxui-dark-info {
        background-color: $--color-info;
        border-color: $--color-info;
        color: $--color-white;
    }

    // light
    &.foxui-light-primary {
        background-color: $--color-primary-light-9;
        border-color: $--color-primary-light-8;
        color: $--color-primary;
    }

    &.foxui-light-danger {
        background-color: $--color-danger-lighter;
        border-color: $--color-danger-light;
        color: $--color-danger;
    }

    &.foxui-light-warning {
        background-color: $--color-warning-lighter;
        border-color: $--color-warning-light;
        color: $--color-warning;
    }

    &.foxui-light-success {
        background-color: $--color-success-lighter;
        border-color: $--color-success-light;
        color: $--color-success;
    }

    &.foxui-light-info {
        background-color: $--color-info-lighter;
        border-color: $--color-info-light;
        color: $--color-info;
    }

    // plain
    &.foxui-plain-primary {
        background-color: $--color-white;
        border-color: $--color-primary-light-8;
        color: $--color-primary;
    }

    &.foxui-plain-danger {
        background-color: $--color-white;
        border-color: $--color-danger-light;
        color: $--color-danger;
    }

    &.foxui-plain-warning {
        background-color: $--color-white;
        border-color: $--color-warning-light;
        color: $--color-warning;
    }

    &.foxui-plain-success {
        background-color: $--color-white;
        border-color: $--color-success-light;
        color: $--color-success;
    }

    &.foxui-plain-info {
        background-color: $--color-white;
        border-color: $--color-info-light;
        color: $--color-info;
    }

    // size
    &.foxui-size-medium {
        height: 28px;
        line-height: 28px;

        .foxui-tag-close {
            transform: scale(0.8);
        }
    }

    &.foxui-size-small {
        height: 24px;
        padding: 0 8px;
        line-height: 24px;

        .foxui-tag-close {
            transform: scale(0.8);
        }
    }

    &.foxui-size-mini {
        height: 20px;
        padding: 0 5px;
        line-height: 20px;

        .foxui-tag-close {
            margin-left: -3px;
            transform: scale(0.7);
        }
    }
}

.foxui-tag-add {
    height: 32px;
    line-height: 32px;
    padding: 0 10px;
    margin-left: 10px;

    // size
    &.foxui-size-medium {
        height: 28px;
        line-height: 28px;
        padding: 0 10px;
    }

    &.foxui-size-small {
        height: 24px;
        padding: 0 8px;
        line-height: 24px;
    }

    &.foxui-size-mini {
        height: 20px;
        padding: 0 5px;
        line-height: 20px;
    }
}

.foxui-tag-input {
    margin-left: 10px;
}
